Repository navigation
feat: placement に配られた offering を読み、metadata を文字列で持ち、placement を付けたまま買えるようにする - #8
Merged
Merged
Conversation
…えるようにする - loadOffering(placement:): placement に配られた offering、無ければ current。どちらだったかを servedBy で返す - SubscriptionOffering.metadata(文字列の値だけ)と droppedMetadataKeys(ほかの型で落とした鍵) - purchase(packageId:from:)・trackPaywallImpression(source:offering:): 読んだときと同じ聞き方で買い・表示を記録する(placement が RevenueCat に届く) - placement の読み方をコアの OfferingLookup に置き、SubscriptionRevenueCatUI もそれを通す(振る舞いは変えない) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012t7xTyzrUGY2uYX5XtNth7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
何のため
入口ごとに RevenueCat の placement で offering を出し分け、offering の metadata をアプリの遠隔の切り替えに使えるようにする。placement の読み方は SubscriptionRevenueCatUI にしか無かったので、コアに下ろす。
足したもの
SubscriptionUseCase.loadOffering(placement:): placement に配られた offering。配られていなければ current。どちらだったかはSubscriptionOffering.servedBy(.placement(_:)・.current・.identifier)SubscriptionOffering.metadata: [String: String]: 文字列の値だけ。ほかの型の鍵はdroppedMetadataKeyspurchase(packageId:from:)・trackPaywallImpression(source:offering:): 読んだときと同じ聞き方で買い・表示を記録する。ID だけで買うと SDK のpresentedOfferingContextに placement が載らないため。読んだ後に placement の割り当てが変わっていたら、見せた offering を ID で買うloadOffering(placement:)はloadOfferings()、新しい 2 つは ID の版へ流す(既存の準拠はそのままコンパイルできる)OfferingLookup(package): コアと SubscriptionRevenueCatUI が同じ読み方をする。SubscriptionRevenueCatUI は current への代用を受け取らないので、振る舞いは変わらない確かめたこと
swift build --build-tests→swift test: XCTest 76 件・Swift Testing 11 件が通る(新しくOfferingPlacementTests11 件)scripts/release.sh --dry-run: minor(3.5.0・削除 0・追加 17)🤖 Generated with Claude Code
https://claude.ai/code/session_012t7xTyzrUGY2uYX5XtNth7